package com.ag.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbGoodstype entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_GOODSTYPE", schema = "dbo", catalog = "AGDB")
public class TbGoodstype implements java.io.Serializable {

	// Fields

	private String gtId;
	private String gtName;
	private String a;
	private String b;
	private String c;
	private Set<TbGoods> tbGoodses = new HashSet<TbGoods>(0);

	// Constructors

	/** default constructor */
	public TbGoodstype() {
	}

	/** minimal constructor */
	public TbGoodstype(String gtId, String gtName) {
		this.gtId = gtId;
		this.gtName = gtName;
	}

	/** full constructor */
	public TbGoodstype(String gtId, String gtName, String a, String b,
			String c, Set<TbGoods> tbGoodses) {
		this.gtId = gtId;
		this.gtName = gtName;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbGoodses = tbGoodses;
	}

	// Property accessors
	@Id
	@Column(name = "GT_ID", unique = true, nullable = false, length = 10)
	public String getGtId() {
		return this.gtId;
	}

	public void setGtId(String gtId) {
		this.gtId = gtId;
	}

	@Column(name = "GT_NAME", nullable = false, length = 30)
	public String getGtName() {
		return this.gtName;
	}

	public void setGtName(String gtName) {
		this.gtName = gtName;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbGoodstype")
	public Set<TbGoods> getTbGoodses() {
		return this.tbGoodses;
	}

	public void setTbGoodses(Set<TbGoods> tbGoodses) {
		this.tbGoodses = tbGoodses;
	}

}